<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改招聘内容')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-content-edit" th:object="${recruitContent}">
            <input name="contentId" th:field="*{contentId}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">招聘名称：</label>
                <div class="col-sm-8">
                    <select id="recruitId" name="recruitId" class="form-control">
                        <option th:each="info : ${infos}" th:text="${info['recruitName']}" th:value="${info['recruitId']}" th:field="*{recruitId}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">岗位名称：</label>
                <div class="col-sm-8">
                    <input name="postName" th:field="*{postName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">岗位代码：</label>
                <div class="col-sm-8">
                    <input name="postCode" th:field="*{postCode}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">岗位层次：</label>
                <div class="col-sm-8">
                    <input name="postLevel" th:field="*{postLevel}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">科目：</label>
                <div class="col-sm-8">
                    <select name="subjectType" class="form-control m-b" th:with="type=${@dict.getType('basic_subject_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{subjectType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最低学历要求：</label>
                <div class="col-sm-8">
                    <select name="educateType" class="form-control m-b" th:with="type=${@dict.getType('basic_educate_name')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{educateType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最低学位要求：</label>
                <div class="col-sm-8">
                    <select name="degreeType" class="form-control m-b" th:with="type=${@dict.getType('basic_educate_degree')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{degreeType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">硕士专业要求：</label>
                <div class="col-sm-8">
                    <input name="major" th:field="*{major}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">本科专业要求：</label>
                <div class="col-sm-8">
                    <input name="major1" th:field="*{major1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">招聘计划人数：</label>
                <div class="col-sm-8">
                    <input name="planNumber" th:field="*{planNumber}" class="form-control" type="number">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">其他要求：</label>
                <div class="col-sm-8">
                    <input name="other" th:field="*{other}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">招聘范围：</label>
                <div class="col-sm-8">
                    <input name="planRange" th:field="*{planRange}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "recruit/content";
        $("#form-content-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-content-edit').serialize());
            }
        }
    </script>
</body>
</html>